<template>
  <div>
    <a-row :gutter="10">
      <a-card :bordered="false">
        <!-- 查询区域 11111-->
        <div class="table-page-search-wrapper">
          <a-form layout="inline" :label-col="labelCol" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="6" :sm="6">
                <a-form-item label="预约日期">
                  <a-date-picker placeholder="请选择预约日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"
                                 v-model="queryParam.schedulingDate" />
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="6">
                <a-form-item label="医生姓名">
                  <a-input v-model="queryParam.doctorName" laceholder="请输入医生姓名" />
                </a-form-item>
              </a-col>
              <a-col :md="6" :sm="6">
                <a-form-item label="客户姓名">
                  <a-input v-model="queryParam.patientName" laceholder="请输入客户姓名" />
                </a-form-item>
              </a-col>
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
           <a-col :md="6" :sm="24">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
           </a-col>
        </span>
            </a-row>
          </a-form>
        </div>


        <!-- table区域-begin -->
        <div>
          <a-table
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :scroll="{x:1500}"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            @change="handleTableChange">

            <template slot="imgSlot" slot-scope="text">
              <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
              <img v-else :src="getImgView(text)" height="30px" alt=""
                   style="max-width:80px;font-size: 12px;font-style: italic;" />
            </template>
            <span slot="action" slot-scope="text, record">

        </span>

          </a-table>
        </div>
      </a-card>
    </a-row>
  </div>

</template>
<script>
import '@assets/less/TableExpand.less'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { putAction, getAction, postAction, deleteAction } from '@api/manage'
import { frozenBatch, queryMyNurseCategoryTreeList, searchByKeywords } from '@api/api'

export default {
  name: 'h_his_nurse_service_projectList',
  mixins: [JeecgListMixin],
  components: {},
  data() {
    return {
      description: '预约上门',
      labelCol: { style: { width: '110px' } },
      queryParam: {
        projectType: '5'
      },
      // 表头
      columns: [
        {
          title: '医生',
          align: 'center',
          dataIndex: 'doctorName',
          width:110,
        },
        {
          title: '预约日期',
          align: 'center',
          dataIndex: 'schedulingDate',
          width:120,
        },
        {
          title: '预约时段',
          align: 'center',
          dataIndex: 'schedulingDate',
          customRender: function(t, r, index) {
            return r.schedulingBeginTime + '~' + r.schedulingEndTime
          },
          width:120,
        },
        {
          title: '客户姓名',
          align: 'center',
          dataIndex: 'patientName',
          width:110,
        },
        {
          title: '性别',
          align: 'center',
          dataIndex: 'patientSex',
          width:85,
        },
        {
          title: '年龄',
          align: 'center',
          dataIndex: 'patientAge',
          width:85,
        },
        {
          title: '预约进度',
          align: 'center',
          dataIndex: 'registrationStatus_dictText',
          width:100,
        },
        {
          title: '确认状态',
          align: 'center',
          dataIndex: 'sureStatus',
          customRender: function(t, r, index) {
            if (t == '1') {
              return '已确认'
            } else if (t == '2') {
              return '拒绝'
            }
            return '待确认'
          },
          width:100,
        },
        {
          title: '确认备住',
          align: 'center',
          dataIndex: 'sureMsg',
          customRender: function(t, r, index) {
            if (t == '') {
              return '---'
            }
            return t;
          },
          width:120,
        },
        {
          title: '评估健康状况',
          align: 'center',
          dataIndex: 'healthyStatus',
          width:120,
        },
        {
          title: '诊断',
          align: 'center',
          dataIndex: 'suggest',
        },
        {
          title: '创建时间',
          align: 'center',
          dataIndex: 'createTime',
          width:130,
        },
        {
          title: '服务评分',
          align: 'center',
          dataIndex: 'score',
          width:100,
        }
      ],
      url: {
        list: '/his/registration/door/list',
        delete: 'ch/door/project/evaluation/package'
      }

    }
  },
  computed: {},
  created() {

  },
  methods: {}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>